package com.zy.imagineCommunity.entity;

import java.util.List;

public class Page<T> {

    //当前页码
    private int pageNo;
    //总页码
    private int pageTotal;
    //每页显示数量
    private int pageSize;
    //总记录数
    private int pageCountTotal;
    //当前页内容
    private List<T> items;

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(int pageTotal) {
        this.pageTotal = pageTotal;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageCountTotal() {
        return pageCountTotal;
    }

    public void setPageCountTotal(int pageCountTotal) {
        this.pageCountTotal = pageCountTotal;
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }

    public Page(int pageNo, int pageTotal, int pageSize, int pageCountTotal, List<T> items) {
        this.pageNo = pageNo;
        this.pageTotal = pageTotal;
        this.pageSize = pageSize;
        this.pageCountTotal = pageCountTotal;
        this.items = items;
    }

    public Page() {

    }

    @Override
    public String toString() {
        return "Page{" +
                "pageNo=" + pageNo +
                ", pageTotal=" + pageTotal +
                ", pageSize=" + pageSize +
                ", pageCountTotal=" + pageCountTotal +
                ", items=" + items +
                '}';
    }

}
